package study.week05.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import study.week05.entity.School;
import study.week05.entity.Student;


@Configuration
public class BeanConfig {

    @Bean
    public Student student(){
        Student stu = new Student();
        stu.setAge(18);
        stu.setStudentName("测试学生");
        return stu;
    }

    @Bean
    public School school(){
        School school = new School();
        school.setAddress("xx路xx号");
        school.setSchoolName("测试学校");
        return school;
    }
}
